package com.foreknow.oopTest;
/**
 * @author shkstart
 * @create 2021-07-23 14:04
 */
public class Person {
    private String name;
    private int age;
    private double height;


    public Person(String name, int age,double height) {
        this.name = name;
        this.height = height;
        this.age = age;
    }

    public Person() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    /**
     * 发问候语
     */
    public void sayHello(){
        System.out.println("hello，my name is "+this.getName());
    }

    public static void main(String[] args) {
        Person p1=new Person("zhangsan",33,1.73);
        p1.sayHello();
        Person p2=new Person("lishi",44,1.74);
        p2.sayHello();

    }

}


